#ifndef SOUND_H_
#define SOUND_H_

#include <portaudio.h>

// this needs fixing
typedef short SAMPLE;

typedef struct
{
  int          frameIndex;  /* Index into sample array. */
  int          maxFrameIndex;
  SAMPLE      *recordedSamples;
} paTestData;


int recordCallback( const void *inputBuffer, void *outputBuffer,
                    unsigned long framesPerBuffer,
                    const PaStreamCallbackTimeInfo* timeInfo,
                    PaStreamCallbackFlags statusFlags,
                    void *userData );

int playCallback( const void *inputBuffer, void *outputBuffer,
                  unsigned long framesPerBuffer,
                  const PaStreamCallbackTimeInfo* timeInfo,
                  PaStreamCallbackFlags statusFlags,
                  void *userData );

int record_raw(const char *file, int seconds);

int playback_raw(const char *file, int seconds);


#endif
